package com.src.hb;

import java.util.concurrent.ThreadFactory;
/**
 * Implementacja fabryki wątków
 * @author peter890
 *
 */
public class ThreadsFactory implements ThreadFactory {
	static int id = 1;

	public Thread newThread(Runnable r) {
		Thread thread = new Thread(r);
		thread.setName("watek_" + id);
		id++;
		thread.setPriority(10);
		return thread;
	}

}
